home *** CD-ROM | disk | FTP | other *** search
/ Cyber Strip Poker / Cyber Strip Poker.rar / IMAGE.img / poker28.dir / 00074_Script_74 < prev    next >
Text File  |  1995-08-14  |  4KB  |  172 lines

  1. --CheckHand
  2. on checkHand
  3.   global hand,YV,YH,YH2
  4.   global y1,y2,y3,y4,y5
  5.   global ys1,ys2,ys3,ys4,ys5
  6.   global namein,nameout
  7.   set YV=0
  8.   set YH=0
  9.   set YH2=0
  10.   -- checkStraightFlush
  11.   if (ys1=ys2) and (ys2=ys3) and (ys3=ys4) and (ys4=ys5) and (y2-y1=1) and ¼
  12.   (y3-y2=1) and (y4-y3=1) and (y5-y4=1) then
  13.     if y5=12 then
  14.       put "HOLY SHIT... A ROYAL FLUSH!!!" into hand
  15.       set YV=8
  16.       set YH=((y5*4)+ys5)
  17.       set YH2=ys5
  18.       exit
  19.     else
  20.       put "YOU'VE GOT A STRAIGHT FLUSH!" into hand
  21.       set YV=8
  22.       set YH=((y5*4)+ys5)
  23.       set YH2=ys5
  24.       exit
  25.     end if
  26.   end if
  27.   -- checkFourOfAKind
  28.   if (y1=y2) and (y2=y3) and (y3=y4) then
  29.     set namein = y4
  30.     namer
  31.     put "You Have Four "&Nameout&"s" into hand
  32.     set YV=7
  33.     set YH=((y4*4))
  34.     set YH2=ys4
  35.     exit
  36.   end if
  37.   if (y2=y3) and (y3=y4) and (y4=y5) then
  38.     set namein = y4
  39.     namer
  40.     put "You Got Four Of A Kind "&Nameout&"s" into hand
  41.     set YV=7
  42.     set YH=((y4*4))
  43.     set YH2=ys5
  44.     exit
  45.   end if
  46.   -- checkFullHouse
  47.   if (y1=y2) and (y2=y3) and (y4=y5) then
  48.     put "You Have Full House" into hand
  49.     set yv=6
  50.     set yh=((y3*4))
  51.     set YH2=((y5*4)+ys3)
  52.     exit  
  53.   end if
  54.   if (y1=y2) and (y3=y4) and (y4=y5) then
  55.     set namein = y5
  56.     namer
  57.     put "You Got 3 "&nameout&"s" into hand
  58.     set namein = y1
  59.     namer
  60.     set hand=hand&" & 2 "&nameout&"s"
  61.     set yv=6
  62.     set yh=((y3*4))
  63.     set YH2=((y2*4)+ys5)
  64.     exit  
  65.   end if  
  66.   -- checkFlush
  67.   if (ys1=ys2) and (ys2=ys3) and (ys3=ys4) and (ys4=ys5) then
  68.     put "You Got A Flush" into hand
  69.     set yv=5
  70.     set yh=((y5*4)+ys5)
  71.     set YH2=ys5
  72.     exit 
  73.   end if
  74.   -- checkStraight
  75.   if (y2-y1=1) and  (y3-y2=1) and (y4-y3=1) and (y5-y4=1) then
  76.     put "You Ended Up With A Straight" into hand
  77.     set yv=4
  78.     set yh=((y5*4)+ys5)
  79.     set YH2=ys5
  80.     exit
  81.   end if
  82.   -- checkTriplets
  83.   if (y1=y2) and (y2=y3) then
  84.     put "You Have Three Of A Kind" into hand
  85.     set yv=3
  86.     set yh=((y3*4))
  87.     set YH2=ys5
  88.     exit 
  89.   end if
  90.   if (y2=y3) and (y3=y4) then
  91.     set namein=y4
  92.     namer
  93.     put "Three Of A Kind "&nameout&"s" into hand
  94.     set yv=3
  95.     set yh=((y4*4))
  96.     set YH2=ys5
  97.     exit 
  98.   end if
  99.   if (y3=y4) and (y4=y5) then
  100.     put "You Got Triples" into hand
  101.     set yv=3
  102.     set yh=((y5*4))
  103.     set YH2=ys2
  104.     exit 
  105.   end if
  106.   -- checkTwoPair
  107.   if (y1=y2) and (y3=y4) then
  108.     put "You Got Two Pair" into hand
  109.     set yv=2
  110.     set yh=((y4*4))
  111.     set YH2=ys5
  112.     exit
  113.   end if
  114.   if (y1=y2) and (y4=y5) then
  115.     set namein = y2
  116.     namer
  117.     put "You Got 2 "&nameout&"s" into hand
  118.     set namein = y4
  119.     namer
  120.     set hand=hand&" & 2 "&nameout&"s"
  121.     set yv=2
  122.     set yh=((y5*4))
  123.     set YH2=ys3
  124.     exit
  125.   end if
  126.   if (y2=y3) and (y4=y5) then
  127.     put "Two Pair On Your Side" into hand
  128.     set yv=2
  129.     set yh=((y5*4))
  130.     set YH2=ys1
  131.     exit
  132.   end if 
  133.   -- checkOnePair
  134.   if (y1=y2) then
  135.     set namein=y2
  136.     namer
  137.     put "A Pair Of "&nameout&"s For You" into hand
  138.     set yv=1
  139.     set yh=((y2*4))
  140.     set YH2=ys5
  141.     exit
  142.   end if
  143.   if (y2=y3) then
  144.     put "You Got One Pair" into hand
  145.     set yv=1
  146.     set yh=((y3*4))
  147.     set YH2=ys5
  148.     exit
  149.   end if
  150.   if (y3=y4) then
  151.     put y4 into namein
  152.     namer
  153.     put "A Pair Of "&nameout&"s For You" into hand
  154.     set yv=1
  155.     set yh=((y4*4))
  156.     set YH2=ys5
  157.     exit
  158.   end if
  159.   if (y4=y5) then
  160.     put "You Show One Pair" into hand
  161.     set yv=1
  162.     set yh=((y5*4))
  163.     set YH2=ys3
  164.     exit
  165.   end if
  166.   -- decideNoPair
  167.   put y5 into namein
  168.   namer
  169.   put "You Got Nothing... "&nameout&" High" into hand
  170.   set yv=0
  171.   set yh=((y5*4))
  172.   set YH2=((y4*4))